Skip to content

feat(deployment): add screened provider marketplace to configure screen#3308

Open
ygrishajev wants to merge 1 commit into
mainfrom
feat/deployment-screened-provider-list
Open

feat(deployment): add screened provider marketplace to configure screen#3308
ygrishajev wants to merge 1 commit into
mainfrom
feat/deployment-screened-provider-list

Conversation

@ygrishajev

@ygrishajev ygrishajev commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Why

The Compute Marketplace pane on the Configure screen showed no providers. Users need to see audited providers screened against the selected placement's group spec so they can pick where to deploy.

Closes CON-421

What

  • Populate the Compute Marketplace pane with audited providers screened for the selected placement's group spec, and add service/placement selection in the deployment pane that drives it.
  • Expose the screenProviders operationId on POST /v1/bid-screening and regenerate the typed console-api-types SDK (incl. the location response field).
  • Validate (not transform) resource values in the api request schema so the proxy can forward them without a BigInt serialization error.
  • Register the screen domain verb for the operation-id-format lint rule.
  • Add useScreenedProviders: screens the selected placement's group spec (audited via signedBy, region via attributes), falling back to the full audited catalog (empty resources) when no placement/SDL is available.
  • Add MarketplaceProvidersTable (Provider, Region, sortable; empty Cost column with an estimate tooltip) styled to the design system; host shown like the bid list via getProviderNameFromUri.
  • Resolve the selected placement in the form and pass it to the marketplace.
  • Select a placement by clicking it (focuses its first service); add a default service when adding a placement; track selected service/placement state.
image

Summary by CodeRabbit

  • New Features

    • Marketplace: screened providers shown per placement with placement name in header and a sortable provider table.
    • API/Docs: screening endpoint published; provider responses now include location.
    • Deployment form: improved placement/service selection behavior and automatic selection when adding placements.
  • Bug Fixes

    • Fixed numeric serialization issues in screening payloads to ensure resource values forward correctly.
  • Tests

    • Expanded tests for screening, provider table, placement and service selection.

@ygrishajev ygrishajev requested a review from a team as a code owner June 12, 2026 12:09
@codecov

codecov Bot commented Jun 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.02970% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.96%. Comparing base (30fe439) to head (9e619c4).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...tplaceProvidersTable/MarketplaceProvidersTable.tsx 89.28% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3308      +/-   ##
==========================================
+ Coverage   68.80%   68.96%   +0.16%     
==========================================
  Files        1096     1098       +2     
  Lines       26833    26913      +80     
  Branches     6436     6454      +18     
==========================================
+ Hits        18462    18561      +99     
+ Misses       7328     7317      -11     
+ Partials     1043     1035       -8     
Flag Coverage Δ
api 84.93% <100.00%> (+0.09%) ⬆️
deploy-web 54.40% <96.93%> (+0.34%) ⬆️
log-collector 85.85% <ø> (ø)
notifications 91.44% <ø> (ø)
provider-console 81.38% <ø> (ø)
provider-inventory 84.98% <ø> (ø)
provider-proxy 86.37% <ø> (ø)
tx-signer 78.37% <ø> (ø)
Files with missing lines Coverage Δ
...bid-screening/http-schemas/bid-screening.schema.ts 87.50% <100.00%> (+35.64%) ⬆️
...Deployment/ConfigurationPane/ConfigurationPane.tsx 100.00% <ø> (ø)
...onfigureDeploymentForm/ConfigureDeploymentForm.tsx 97.01% <100.00%> (+0.78%) ⬆️
...figureDeploymentPanes/ConfigureDeploymentPanes.tsx 100.00% <100.00%> (ø)
...figureDeployment/DeploymentPane/DeploymentPane.tsx 100.00% <100.00%> (ø)
...ent/DeploymentPane/PlacementCard/PlacementCard.tsx 95.83% <100.00%> (+10.11%) ⬆️
...eployment/DeploymentPane/ServiceRow/ServiceRow.tsx 100.00% <100.00%> (ø)
...entPane/usePlacementManager/usePlacementManager.ts 95.74% <100.00%> (+0.39%) ⬆️
...gureDeployment/MarketplacePane/MarketplacePane.tsx 100.00% <100.00%> (+50.00%) ⬆️
...pps/deploy-web/src/queries/useScreenedProviders.ts 100.00% <100.00%> (ø)
... and 2 more

... and 5 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

This PR implements placement-aware provider screening: it changes API resource validation to string-only, adds operationId and provider location to OpenAPI/types, introduces a screening hook, wires placementName from ConfigureDeployment into MarketplacePane, and adds a sortable MarketplaceProvidersTable with tests.

Changes

Marketplace Provider Screening Flow

Layer / File(s) Summary
API resource schema and controller test
apps/api/src/bid-screening/http-schemas/bid-screening.schema.ts, apps/api/src/bid-screening/controllers/bid-screening/bid-screening.controller.spec.ts
ResourceValueSchema validates resource values as unsigned-integer strings (including base64) without transforming to bigint; controller test parses requests with BidScreeningRequestSchema and asserts proxied JSON body CPU/GPU values.
API operation metadata and generated types
apps/api/src/bid-screening/routes/bid-screening.router.ts, apps/api/swagger/openapi.json, packages/console-api-types/src/operations.gen.ts, packages/console-api-types/src/schema.d.ts, packages/dev-config/.eslintrc.base.js
Added operationId: "screenProviders" for POST /v1/bid-screening, added provider location to OpenAPI and generated types, and extended ESLint akash/operation-id-format to allow screen.
ConfigureDeployment: placement/service selection wiring
apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentForm/ConfigureDeploymentForm.tsx
Form now uses useWatch to derive selectedPlacementName from services/placements; initial/seed/next selection logic enforces non-null selectedServiceId.
Panes integration and prop forwarding
apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentPanes/ConfigureDeploymentPanes.tsx, .../ConfigureDeploymentPanes.spec.tsx
ConfigureDeploymentPanes now requires selectedPlacementName and forwards it to MarketplacePane; tests assert placementName is threaded into pane props.
DeploymentPane and placement manager
apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/DeploymentPane.tsx, .../usePlacementManager/usePlacementManager.ts
addPlacement returns the created service id and DeploymentPane selects it on add; selectedServiceId props tightened to non-null string across related components and tests.
PlacementCard and ServiceRow interactions
apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/PlacementCard/PlacementCard.tsx, .../ServiceRow/ServiceRow.tsx
PlacementCard derives firstServiceId, click handlers stop propagation and call callbacks, selection visuals adjusted; ServiceRow click prevents placement selection; tests added/updated.
Marketplace query hook
apps/deploy-web/src/queries/useScreenedProviders.ts, .../useScreenedProviders.spec.tsx
Adds useScreenedProviders and buildPlacementScreeningRequest: build audited screening requests from SDL placement groups or return null to trigger EMPTY_CATALOG_REQUEST; exposes providers/isLoading/isError and includes tests.
MarketplacePane component and tests
apps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplacePane.tsx, .../MarketplacePane.spec.tsx
MarketplacePane accepts sdl and placementName, injects useScreenedProviders via DEPENDENCIES, renders placement header, shows an alert on load failure when no cached providers, or renders MarketplaceProvidersTable otherwise; tests validate behaviors.
MarketplaceProvidersTable component and tests
apps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplaceProvidersTable/MarketplaceProvidersTable.tsx, .../MarketplaceProvidersTable.spec.tsx
Adds a sortable TanStack table (Provider, Region with fallback), loading/empty states, and SortableHeader helper; tests for row rendering, null-region display, and sorting.
SDL builder validation and specs
apps/deploy-web/src/types/sdlBuilder/sdlBuilder.ts, .../sdlBuilder.spec.ts
ServiceSchema.id changed to required non-empty string; tests updated to include id in fixtures and adjust duplicate-title test ids.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested labels

size: XL

Suggested reviewers

  • stalniy
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/deployment-screened-provider-list

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed due to a network error.


Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot temporarily deployed to beta-sandbox June 12, 2026 12:10 Inactive
@github-actions github-actions Bot temporarily deployed to beta-mainnet June 12, 2026 12:10 Inactive
@github-actions github-actions Bot temporarily deployed to production-sandbox June 12, 2026 12:11 Inactive
@github-actions github-actions Bot temporarily deployed to beta-sandbox June 12, 2026 12:11 Inactive
@github-actions github-actions Bot temporarily deployed to production-sandbox June 12, 2026 12:12 Inactive
@github-actions github-actions Bot temporarily deployed to beta June 12, 2026 12:12 Inactive
@github-actions github-actions Bot temporarily deployed to beta-mainnet June 12, 2026 12:12 Inactive
@github-actions github-actions Bot temporarily deployed to beta-sandbox June 12, 2026 12:13 Inactive
@github-actions github-actions Bot deployed to beta-mainnet June 12, 2026 12:13 Active
@github-actions github-actions Bot temporarily deployed to beta June 12, 2026 12:13 Inactive
@github-actions github-actions Bot deployed to beta-sandbox June 12, 2026 12:13 Active
@github-actions github-actions Bot temporarily deployed to production June 12, 2026 12:13 Inactive
@github-actions github-actions Bot temporarily deployed to production-sandbox June 12, 2026 12:15 Inactive
@github-actions github-actions Bot deployed to production-sandbox June 12, 2026 12:16 Active

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/console-api-types/src/schema.d.ts (1)

6792-6992: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

screenProviders is missing from the generated operations type surface.

operations.gen.ts now exports v1.screenProviders, and /v1/bid-screening is present here, but interface operations in this file has no screenProviders member. This leaves the generated SDK contract internally inconsistent and can break typed consumers expecting operations["screenProviders"].

Please regenerate @akashnetwork/console-api-types from the updated OpenAPI so screenProviders is present in both generated artifacts.

As per coding guidelines, packages/**/*.ts reviews must focus on breaking changes to public API surface, type safety, and missing exports.

Also applies to: 7882-9507

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/console-api-types/src/schema.d.ts` around lines 6792 - 6992, The
operations interface in the generated types (schema.d.ts) is missing the
screenProviders member even though operations.gen.ts now exports
v1.screenProviders (the /v1/bid-screening endpoint), causing an inconsistent
public API; regenerate the console-api-types from the updated OpenAPI spec so
the operations interface includes a "screenProviders" entry that matches the
exported v1.screenProviders contract, ensuring /v1/bid-screening is present in
both the operations.gen.ts export surface and the operations interface in
schema.d.ts (re-run the OpenAPI-to-types generation script or CLI used by this
repo and commit the updated generated files).

Source: Coding guidelines

🧹 Nitpick comments (2)
apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentPanes/ConfigureDeploymentPanes.spec.tsx (1)

100-142: ⚡ Quick win

Add a direct assertion for selectedPlacementName passthrough.

setup() now accepts selectedPlacementName, but this suite still never verifies that ConfigureDeploymentPanes forwards it into MarketplacePane. That leaves the new placement-scoped marketplace path untested even though it is part of the runtime contract.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentPanes/ConfigureDeploymentPanes.spec.tsx`
around lines 100 - 142, The test never asserts that ConfigureDeploymentPanes
forwards selectedPlacementName into the MarketplacePane; update the test to mock
MarketplacePane (reuse the MarketplacePane entry in the dependencies object) so
it captures props, pass a non-null selectedPlacementName into setup(), render,
and add an assertion that MarketplacePane was called with
props.selectedPlacementName equal to the value you passed; locate the mock
MarketplacePane in setup(), make it return a testid element and expose the mock
from setup() (alongside SdlPreviewPane, DeploymentPane, ConfigurationPane), then
add an expect(MarketplacePane).toHaveBeenCalledWith(expect.objectContaining({
selectedPlacementName: 'your-test-value' }), expect.anything()) to verify
passthrough from ConfigureDeploymentPanes.
apps/deploy-web/src/queries/useScreenedProviders.spec.tsx (1)

77-87: ⚡ Quick win

Replace the unsafe test-only casts in apps/deploy-web/src/queries/useScreenedProviders.spec.tsx and apps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplacePane.spec.tsx.

Both files bypass collaborator typing with as unknown as / as never, which suppresses type drift in the generated API and injected dependency contracts. One typed mock/stub pattern should be used in both files so these tests keep validating the real shape they depend on.

As per coding guidelines, use mock<T>() instead of as unknown as <Type> for type casting in tests.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/deploy-web/src/queries/useScreenedProviders.spec.tsx` around lines 77 -
87, The test uses unsafe casts (as unknown as / as never) to build the api stub
in the setup function (variables: useQuery, api) which hides signature drift;
replace these casts with a properly typed test mock using mock<T>() so the stub
enforces the real API shape — e.g., create a typed mock for
ReturnType<NonNullable<NonNullable<NonNullable<Parameters<typeof
setupQuery>[1]>["services"]>["api"]>> and assign useQuery into its
v1.screenProviders.useQuery property using mock<T> to preserve types; apply the
same typed-mock pattern in MarketplacePane.spec.tsx so both tests validate the
actual collaborator contracts instead of using as unknown/as never.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentForm/ConfigureDeploymentForm.tsx`:
- Around line 41-43: When a selected service is removed the watched
services/placements can transiently make resolveSelectedPlacementName(...)
return null; compute an effective selected service id from the watched values
during render instead of relying on the effect-driven selectedServiceId.
Concretely: use the values returned by useWatch (services and placements) to
check whether selectedServiceId still exists; if not, pick a surviving service
id (e.g., first key of services) as the effective id and pass that into
resolveSelectedPlacementName(services, placements, effectiveSelectedServiceId)
so placementName never becomes null and MarketplacePane won't fall back to the
unscoped catalog.

In
`@apps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplacePane.spec.tsx`:
- Line 26: The test incorrectly asserts a second call argument for the mocked
component; update the assertion in MarketplacePane.spec.tsx to only check the
props object passed to the mock: change the toHaveBeenCalledWith invocation for
MarketplaceProvidersTable to assert only expect.objectContaining({ providers,
isLoading: false }) (omit the second expect.anything()), since the JSX render
calls the mock with a single props argument.

In
`@apps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplacePane.tsx`:
- Around line 25-32: The component currently replaces the table with an error
alert whenever isError is true; instead, keep rendering the
d.MarketplaceProvidersTable when useScreenedProviders' providers array has items
even if isError is true. Update the JSX conditional in MarketplacePane.tsx to
show the "Failed to load providers" alert only when isError && providers.length
=== 0, otherwise render d.MarketplaceProvidersTable with providers and
isLoading; this preserves prior data from useScreenedProviders/query.data on
refetch failures.

---

Outside diff comments:
In `@packages/console-api-types/src/schema.d.ts`:
- Around line 6792-6992: The operations interface in the generated types
(schema.d.ts) is missing the screenProviders member even though
operations.gen.ts now exports v1.screenProviders (the /v1/bid-screening
endpoint), causing an inconsistent public API; regenerate the console-api-types
from the updated OpenAPI spec so the operations interface includes a
"screenProviders" entry that matches the exported v1.screenProviders contract,
ensuring /v1/bid-screening is present in both the operations.gen.ts export
surface and the operations interface in schema.d.ts (re-run the OpenAPI-to-types
generation script or CLI used by this repo and commit the updated generated
files).

---

Nitpick comments:
In
`@apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentPanes/ConfigureDeploymentPanes.spec.tsx`:
- Around line 100-142: The test never asserts that ConfigureDeploymentPanes
forwards selectedPlacementName into the MarketplacePane; update the test to mock
MarketplacePane (reuse the MarketplacePane entry in the dependencies object) so
it captures props, pass a non-null selectedPlacementName into setup(), render,
and add an assertion that MarketplacePane was called with
props.selectedPlacementName equal to the value you passed; locate the mock
MarketplacePane in setup(), make it return a testid element and expose the mock
from setup() (alongside SdlPreviewPane, DeploymentPane, ConfigurationPane), then
add an expect(MarketplacePane).toHaveBeenCalledWith(expect.objectContaining({
selectedPlacementName: 'your-test-value' }), expect.anything()) to verify
passthrough from ConfigureDeploymentPanes.

In `@apps/deploy-web/src/queries/useScreenedProviders.spec.tsx`:
- Around line 77-87: The test uses unsafe casts (as unknown as / as never) to
build the api stub in the setup function (variables: useQuery, api) which hides
signature drift; replace these casts with a properly typed test mock using
mock<T>() so the stub enforces the real API shape — e.g., create a typed mock
for ReturnType<NonNullable<NonNullable<NonNullable<Parameters<typeof
setupQuery>[1]>["services"]>["api"]>> and assign useQuery into its
v1.screenProviders.useQuery property using mock<T> to preserve types; apply the
same typed-mock pattern in MarketplacePane.spec.tsx so both tests validate the
actual collaborator contracts instead of using as unknown/as never.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: fbd4e12c-b6b8-4d71-90af-06393bfbe64c

📥 Commits

Reviewing files that changed from the base of the PR and between 30fe439 and 036865f.

📒 Files selected for processing (23)
  • apps/api/src/bid-screening/controllers/bid-screening/bid-screening.controller.spec.ts
  • apps/api/src/bid-screening/http-schemas/bid-screening.schema.ts
  • apps/api/src/bid-screening/routes/bid-screening.router.ts
  • apps/api/swagger/openapi.json
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentForm/ConfigureDeploymentForm.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentPanes/ConfigureDeploymentPanes.spec.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentPanes/ConfigureDeploymentPanes.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/DeploymentPane.spec.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/DeploymentPane.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/PlacementCard/PlacementCard.spec.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/PlacementCard/PlacementCard.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/ServiceRow/ServiceRow.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/usePlacementManager/usePlacementManager.spec.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/usePlacementManager/usePlacementManager.ts
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplacePane.spec.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplacePane.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplaceProvidersTable/MarketplaceProvidersTable.spec.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplaceProvidersTable/MarketplaceProvidersTable.tsx
  • apps/deploy-web/src/queries/useScreenedProviders.spec.tsx
  • apps/deploy-web/src/queries/useScreenedProviders.ts
  • packages/console-api-types/src/operations.gen.ts
  • packages/console-api-types/src/schema.d.ts
  • packages/dev-config/.eslintrc.base.js

@github-actions github-actions Bot deployed to beta June 12, 2026 12:17 Active
@github-actions github-actions Bot deployed to production June 12, 2026 12:27 Active
@ygrishajev ygrishajev force-pushed the feat/deployment-screened-provider-list branch from 036865f to 4b8349a Compare June 12, 2026 13:47

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@apps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplacePane.spec.tsx`:
- Line 26: The two assertions incorrectly expect a second argument when
verifying the JSX-rendered function component MarketplaceProvidersTable; update
the test to inspect the actual props object passed by examining
MarketplaceProvidersTable.mock.calls[0]?.[0] (and similarly for the other
assertion around line 41) instead of using toHaveBeenCalledWith(...,
expect.anything()), so you assert the props (e.g., providers and isLoading)
directly from mock.calls[0][0].
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 30ef429b-f011-4fff-9600-cf3501784cde

📥 Commits

Reviewing files that changed from the base of the PR and between 036865f and 4b8349a.

⛔ Files ignored due to path filters (1)
  • apps/api/test/functional/__snapshots__/docs.spec.ts.snap is excluded by !**/*.snap
📒 Files selected for processing (27)
  • apps/api/src/bid-screening/controllers/bid-screening/bid-screening.controller.spec.ts
  • apps/api/src/bid-screening/http-schemas/bid-screening.schema.ts
  • apps/api/src/bid-screening/routes/bid-screening.router.ts
  • apps/api/swagger/openapi.json
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/ConfigurationPane.spec.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/ConfigurationPane.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentForm/ConfigureDeploymentForm.spec.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentForm/ConfigureDeploymentForm.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentPanes/ConfigureDeploymentPanes.spec.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentPanes/ConfigureDeploymentPanes.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/DeploymentPane.spec.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/DeploymentPane.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/PlacementCard/PlacementCard.spec.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/PlacementCard/PlacementCard.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/ServiceRow/ServiceRow.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/usePlacementManager/usePlacementManager.spec.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/usePlacementManager/usePlacementManager.ts
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplacePane.spec.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplacePane.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplaceProvidersTable/MarketplaceProvidersTable.spec.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplaceProvidersTable/MarketplaceProvidersTable.tsx
  • apps/deploy-web/src/queries/useScreenedProviders.spec.tsx
  • apps/deploy-web/src/queries/useScreenedProviders.ts
  • apps/deploy-web/src/types/sdlBuilder/sdlBuilder.ts
  • packages/console-api-types/src/operations.gen.ts
  • packages/console-api-types/src/schema.d.ts
  • packages/dev-config/.eslintrc.base.js
✅ Files skipped from review due to trivial changes (2)
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/ServiceRow/ServiceRow.tsx
  • packages/console-api-types/src/schema.d.ts
🚧 Files skipped from review as they are similar to previous changes (17)
  • packages/dev-config/.eslintrc.base.js
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentPanes/ConfigureDeploymentPanes.tsx
  • packages/console-api-types/src/operations.gen.ts
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplaceProvidersTable/MarketplaceProvidersTable.spec.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/usePlacementManager/usePlacementManager.ts
  • apps/api/src/bid-screening/controllers/bid-screening/bid-screening.controller.spec.ts
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/PlacementCard/PlacementCard.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentPanes/ConfigureDeploymentPanes.spec.tsx
  • apps/api/src/bid-screening/http-schemas/bid-screening.schema.ts
  • apps/api/swagger/openapi.json
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplaceProvidersTable/MarketplaceProvidersTable.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentForm/ConfigureDeploymentForm.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplacePane.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/DeploymentPane.spec.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/PlacementCard/PlacementCard.spec.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/usePlacementManager/usePlacementManager.spec.tsx
  • apps/deploy-web/src/queries/useScreenedProviders.ts

const providers = [makeProvider()];
const { MarketplaceProvidersTable } = setup({ providers, isLoading: false });

expect(MarketplaceProvidersTable).toHaveBeenCalledWith(expect.objectContaining({ providers, isLoading: false }), expect.anything());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Root cause: Both assertions at lines 26 and 41 incorrectly expect a second argument when verifying JSX-rendered function component calls.

React invokes function components via JSX with only a props object; the second parameter is always undefined. expect.anything() does not match undefined, making these assertions fail their intent. Replace both toHaveBeenCalledWith calls with direct inspection of mock.calls[0]?.[0].

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@apps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplacePane.spec.tsx`
at line 26, The two assertions incorrectly expect a second argument when
verifying the JSX-rendered function component MarketplaceProvidersTable; update
the test to inspect the actual props object passed by examining
MarketplaceProvidersTable.mock.calls[0]?.[0] (and similarly for the other
assertion around line 41) instead of using toHaveBeenCalledWith(...,
expect.anything()), so you assert the props (e.g., providers and isLoading)
directly from mock.calls[0][0].

@ygrishajev ygrishajev force-pushed the feat/deployment-screened-provider-list branch from 4b8349a to 6a51238 Compare June 12, 2026 14:12
Populate the Compute Marketplace pane with audited providers screened for the
selected placement's group spec, and drive it from the deployment pane's
service/placement selection.

API / SDK
- expose the screenProviders operationId on POST /v1/bid-screening and surface it
  in the typed console-api-types SDK (incl. the location response field)
- validate (don't transform) resource values in the request schema so the proxy
  forwards them without a BigInt serialization error
- register the "screen" domain verb for the operation-id-format lint rule

Marketplace (deploy-web)
- useScreenedProviders: screens the selected placement's group spec (audited via
  signedBy, region via attributes), falling back to the full audited catalog
  (empty resources) while the SDL is mid-edit/invalid
- MarketplaceProvidersTable: design-system table with sortable Provider/Region
  columns and an empty Cost column with an estimate tooltip; host formatted like
  the bid list via getProviderNameFromUri
- MarketplacePane keeps the cached table on a refetch error; shows the error only
  when there is nothing to display

Deployment pane selection
- clicking a service selects it; clicking a placement selects its first service;
  adding a placement adds a default service; selected service/placement states
- resolve the selected placement in the form and pass it to the marketplace
- normalize a service-less carried-in SDL to a default at the configure entry, so
  the selected service/placement are always present (required, non-nullable)
- require the service id in the form schema (always generated) to drop id casts
@ygrishajev ygrishajev force-pushed the feat/deployment-screened-provider-list branch from 6a51238 to 9e619c4 Compare June 12, 2026 15:51

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@apps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplaceProvidersTable/MarketplaceProvidersTable.tsx`:
- Around line 18-21: The Provider column is sorted by the raw hostUri but
renders getProviderNameFromUri(info.getValue()), causing mismatched sort order
when schemes/ports differ; update the column definition created with
columnHelper.accessor("hostUri") so its sort value matches the rendered hostname
(use the provider name derived by getProviderNameFromUri as the sort key or
change the accessor to return that name) and keep the header using
SortableHeader and cell using ShortenedValue(getProviderNameFromUri(...)); also
extend the existing test to include rows with mixed schemes/ports so it asserts
that displayed order (ShortenedValue/getProviderNameFromUri) equals the sort
order.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4277164a-3996-403f-b95d-30a8d0d09d40

📥 Commits

Reviewing files that changed from the base of the PR and between 6a51238 and 9e619c4.

⛔ Files ignored due to path filters (1)
  • apps/api/test/functional/__snapshots__/docs.spec.ts.snap is excluded by !**/*.snap
📒 Files selected for processing (28)
  • apps/api/src/bid-screening/controllers/bid-screening/bid-screening.controller.spec.ts
  • apps/api/src/bid-screening/http-schemas/bid-screening.schema.ts
  • apps/api/src/bid-screening/routes/bid-screening.router.ts
  • apps/api/swagger/openapi.json
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/ConfigurationPane.spec.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/ConfigurationPane.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentForm/ConfigureDeploymentForm.spec.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentForm/ConfigureDeploymentForm.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentPanes/ConfigureDeploymentPanes.spec.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentPanes/ConfigureDeploymentPanes.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/DeploymentPane.spec.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/DeploymentPane.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/PlacementCard/PlacementCard.spec.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/PlacementCard/PlacementCard.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/ServiceRow/ServiceRow.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/usePlacementManager/usePlacementManager.spec.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/usePlacementManager/usePlacementManager.ts
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplacePane.spec.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplacePane.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplaceProvidersTable/MarketplaceProvidersTable.spec.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplaceProvidersTable/MarketplaceProvidersTable.tsx
  • apps/deploy-web/src/queries/useScreenedProviders.spec.tsx
  • apps/deploy-web/src/queries/useScreenedProviders.ts
  • apps/deploy-web/src/types/sdlBuilder/sdlBuilder.spec.ts
  • apps/deploy-web/src/types/sdlBuilder/sdlBuilder.ts
  • packages/console-api-types/src/operations.gen.ts
  • packages/console-api-types/src/schema.d.ts
  • packages/dev-config/.eslintrc.base.js
✅ Files skipped from review due to trivial changes (1)
  • packages/console-api-types/src/schema.d.ts
🚧 Files skipped from review as they are similar to previous changes (26)
  • apps/api/src/bid-screening/routes/bid-screening.router.ts
  • packages/dev-config/.eslintrc.base.js
  • apps/deploy-web/src/types/sdlBuilder/sdlBuilder.ts
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/ConfigurationPane.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/ConfigurationPane.spec.tsx
  • apps/api/swagger/openapi.json
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/DeploymentPane.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/DeploymentPane.spec.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/usePlacementManager/usePlacementManager.spec.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentPanes/ConfigureDeploymentPanes.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplaceProvidersTable/MarketplaceProvidersTable.spec.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/ServiceRow/ServiceRow.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/usePlacementManager/usePlacementManager.ts
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentPanes/ConfigureDeploymentPanes.spec.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentForm/ConfigureDeploymentForm.spec.tsx
  • apps/api/src/bid-screening/http-schemas/bid-screening.schema.ts
  • packages/console-api-types/src/operations.gen.ts
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/PlacementCard/PlacementCard.tsx
  • apps/deploy-web/src/queries/useScreenedProviders.spec.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentPane/PlacementCard/PlacementCard.spec.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplacePane.spec.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplacePane.tsx
  • apps/api/src/bid-screening/controllers/bid-screening/bid-screening.controller.spec.ts
  • apps/deploy-web/src/types/sdlBuilder/sdlBuilder.spec.ts
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentForm/ConfigureDeploymentForm.tsx
  • apps/deploy-web/src/queries/useScreenedProviders.ts

Comment on lines +18 to +21
columnHelper.accessor("hostUri", {
header: ({ column }) => <SortableHeader column={column} title="Provider" />,
cell: info => <ShortenedValue value={getProviderNameFromUri(info.getValue())} maxLength={40} headLength={14} />
}),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Locate the file and print the relevant section with line numbers
FILE="apps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplaceProvidersTable/MarketplaceProvidersTable.tsx"
echo "== File = $FILE =="
wc -l "$FILE"
sed -n '1,220p' "$FILE" | nl -ba | sed -n '1,140p'

echo
echo "== Provider name helper usage =="
rg -n "getProviderNameFromUri|hostUri|accessor\\(" "$FILE"

echo
echo "== Find tests mentioning MarketplaceProvidersTable or Provider sorting =="
rg -n "MarketplaceProvidersTable|getProviderNameFromUri|Provider.*sort|ascending sort|scheme.*port|NO_REGION" apps/deploy-web -S --glob='**/*.{ts,tsx,js,jsx}'

Repository: akash-network/console

Length of output: 413


🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE="apps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplaceProvidersTable/MarketplaceProvidersTable.tsx"
echo "== File = $FILE =="
wc -l "$FILE"
echo

echo "== Lines 1-140 (with line numbers via cat -n) =="
cat -n "$FILE" | sed -n '1,140p'

echo
echo "== Search within file for relevant identifiers =="
rg -n "getProviderNameFromUri|hostUri|accessor\\(" "$FILE"

echo
echo "== Search for related tests/usages =="
rg -n "MarketplaceProvidersTable|getProviderNameFromUri|Provider.*sort|ascending sort|scheme.*port|NO_REGION" apps/deploy-web -S --glob='**/*.{ts,tsx,js,jsx}'

Repository: akash-network/console

Length of output: 9948


🏁 Script executed:

#!/bin/bash
set -euo pipefail

SPEC="apps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplaceProvidersTable/MarketplaceProvidersTable.spec.tsx"
UTIL="apps/deploy-web/src/utils/providerUtils.ts"

echo "== SPEC = $SPEC =="
wc -l "$SPEC"
echo
cat -n "$SPEC" | sed -n '1,200p'

echo
echo "== UTIL = $UTIL =="
wc -l "$UTIL"
echo
cat -n "$UTIL" | sed -n '1,140p'

Repository: akash-network/console

Length of output: 6091


Fix Provider column sort key to match rendered hostname

The table sorts by hostUri (column accessor), but renders getProviderNameFromUri(info.getValue()) (hostname). If schemes/ports differ, rows can appear ordered differently than what users see.

Suggested fix
 const columns = [
-  columnHelper.accessor("hostUri", {
+  columnHelper.accessor(provider => getProviderNameFromUri(provider.hostUri), {
+    id: "hostUri",
     header: ({ column }) => <SortableHeader column={column} title="Provider" />,
-    cell: info => <ShortenedValue value={getProviderNameFromUri(info.getValue())} maxLength={40} headLength={14} />
+    cell: info => <ShortenedValue value={info.getValue()} maxLength={40} headLength={14} />
   }),

Current test only changes hostnames (same scheme/port), so it won’t catch this mismatch—add a mixed scheme/port case to ensure displayed order == sort order.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
columnHelper.accessor("hostUri", {
header: ({ column }) => <SortableHeader column={column} title="Provider" />,
cell: info => <ShortenedValue value={getProviderNameFromUri(info.getValue())} maxLength={40} headLength={14} />
}),
columnHelper.accessor(provider => getProviderNameFromUri(provider.hostUri), {
id: "hostUri",
header: ({ column }) => <SortableHeader column={column} title="Provider" />,
cell: info => <ShortenedValue value={info.getValue()} maxLength={40} headLength={14} />
}),
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@apps/deploy-web/src/components/deployments/ConfigureDeployment/MarketplacePane/MarketplaceProvidersTable/MarketplaceProvidersTable.tsx`
around lines 18 - 21, The Provider column is sorted by the raw hostUri but
renders getProviderNameFromUri(info.getValue()), causing mismatched sort order
when schemes/ports differ; update the column definition created with
columnHelper.accessor("hostUri") so its sort value matches the rendered hostname
(use the provider name derived by getProviderNameFromUri as the sort key or
change the accessor to return that name) and keep the header using
SortableHeader and cell using ShortenedValue(getProviderNameFromUri(...)); also
extend the existing test to include rows with mixed schemes/ports so it asserts
that displayed order (ShortenedValue/getProviderNameFromUri) equals the sort
order.

dcloud:
pricing:
web:
denom: uakt

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uact

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants